﻿
Namespace Facades

    <EditableZone(IsFacade:=True)> _
    Public Class ContinuousFacade
        Inherits XamChartFacade

        Private _Spline As Boolean


        <EditableProperty(Group:="Visual")> _
        Public Property Spline As Boolean
            Get
                Return Me._Spline
            End Get
            Set(ByVal value As Boolean)
                Me._Spline = value
                If brother.Series.Count = 0 Then Return

                brother.Series(0).ChartType = If(value, _
                        Infragistics.Windows.Chart.ChartType.Spline, _
                         Infragistics.Windows.Chart.ChartType.Line)
            End Set
        End Property


        Public Overrides Sub AddSeries(ByVal target As Object)
            If brother.Series.Count > 0 Then Return

            Dim ser = New Infragistics.Windows.Chart.Series()
            ser.ChartType = Infragistics.Windows.Chart.ChartType.Line
            ser.DataPoints.Add(1.5)
            ser.DataPoints.Add(1.7)
            ser.DataPoints.Add(1.3)


            brother.Series.Add(ser)
        End Sub
    End Class

End Namespace
